<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>vstmidiout</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="vstinfo.html" title="vstinfo" />
    <link rel="next" href="vstnote.html" title="vstnote" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">vstmidiout</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="vstinfo.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="vstnote.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="vstmidiout"></a>
      <div class="titlepage"></div>
      <a id="IndexVstMidiOut" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">vstmidiout</span>
        </h2>
        <p>vstmidiout — 
      Sends MIDI information to a VST plugin.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp166356048"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>vstmidiout</strong></span> instance, kstatus, kchan, kdata1, kdata2</pre>
      </div>
      <div class="refsect1">
        <a id="idp166368912"></a>
        <h2>Description</h2>
        <p><span class="emphasis"><em>vstmidiout</em></span> is used for sending MIDI information to a VST plugin.</p>
      </div>
      <div class="refsect1">
        <a id="idp166370448"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>instance</em></span> - the number which identifies the
      plugin, to be passed to other vst4cs opcodes.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp166415648"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kstatus</em></span> - the type of midi message to be
      sent. Currently noteon (144), note off (128), Control Change (176),
      Program change (192), Aftertouch (208) and Pitch Bend (224) are
      supported.
    </p>
        <p>
      <span class="emphasis"><em>kchan</em></span> - the MIDI channel transmitted
      on.
    </p>
        <p>
      <span class="emphasis"><em>kdata1, kdata2</em></span> - the MIDI data pair, which
      varies depending on <span class="emphasis"><em>kstatus</em></span>. e.g. note/velocity for note on and note
      off, Controller number/value for control change.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp166419424"></a>
        <h2>Examples</h2>
        <div class="example">
          <a id="idp166420064"></a>
          <p class="title">
            <strong>Example 1026. Example for vstmidiout</strong>
          </p>
          <div class="example-contents">
            <pre class="programlisting">
<span class="comment">/* orc */</span>
<span class="ohdr">sr</span>     <span class="op">=</span> 44100
<span class="ohdr">kr</span>     <span class="op">=</span> 4410
<span class="ohdr">ksmps</span>  <span class="op">=</span> 10
<span class="ohdr">nchnls</span> <span class="op">=</span> 2

gihandle1 <span class="opc">vstinit</span> "c:/vstplugins/cheeze/cheeze machine.dll", 1

<span class="oblock">instr</span> 3
ain1      <span class="op">=</span>           0
ab1, ab2  <span class="opc">vstaudio</span>    gihandle1, ain1, ain1
          <span class="opc">outs</span>        ab1, ab2
<span class="oblock">endin</span>

<span class="oblock">instr</span> 4
          <span class="opc">vstmidiout</span>  gihandle1, 144, 1, p4, p5
<span class="oblock">endin</span>


<span class="comment">/* sco */</span>
<span class="stamnt">i</span> 3 0 21

<span class="stamnt">i</span> 4  1 1 57  32
<span class="stamnt">i</span> 4  3 1 60 100
<span class="stamnt">i</span> 4  5 1 62 100
<span class="stamnt">i</span> 4  7 1 64 100
<span class="stamnt">i</span> 4  9 1 65 100
<span class="stamnt">i</span> 4 11 1 67 100
<span class="stamnt">i</span> 4 13 1 69 100
<span class="stamnt">i</span> 4 15 3 71 100
<span class="stamnt">i</span> 4 18 3 72 100
<span class="stamnt">e</span></pre>
          </div>
        </div>
        <br class="example-break" />
      </div>
      <div class="refsect1">
        <a id="idp166442000"></a>
        <h2>Credits</h2>
        <p>By: Andrés Cabrera and Michael Gogins</p>
        <p>
      Uses code from Hermann Seib's VSTHost and Thomas Grill's vst~
      object.
    </p>
        <p>
      VST is a trademark of Steinberg Media Technologies GmbH. 
      VST Plug-In Technology by Steinberg.
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="vstinfo.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="vstnote.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">vstinfo </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> vstnote</td>
        </tr>
      </table>
    </div>
  </body>
</html>
